//
//  NSUserDefaults+LXUserDefaults.m
//  LvXi_newVersion
//
//  Created by 王敏 on 2016/11/15.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "NSUserDefaults+LXUserDefaults.h"

@implementation NSUserDefaults (LXUserDefaults)



+(void)setString:(NSString*)stringValue forKey:(NSString*)key{
    [[NSUserDefaults standardUserDefaults] setValue:stringValue forKey:key];
}
+(void)setNumber:(NSNumber*)numberValue forKey:(NSString*)key{
    [[NSUserDefaults standardUserDefaults] setValue:numberValue forKey:key];
}
+(void)setInteger:(NSInteger)integerValue forKey:(NSString*)key{
    [[NSUserDefaults standardUserDefaults] setValue:@(integerValue) forKey:key];
}
+(void)setfloat:(CGFloat)floatValue forKey:(NSString*)key{
    [[NSUserDefaults standardUserDefaults] setValue:@(floatValue) forKey:key];
}
+(void)setBool:(BOOL)boolValue forKey:(NSString*)key{
    [[NSUserDefaults standardUserDefaults] setValue:@(boolValue) forKey:key];
}



+(NSString*)stringValueForKey:(NSString*)key{
    return [[NSUserDefaults standardUserDefaults] valueForKey:key];
}
+(NSNumber*)numberValueForKey:(NSString*)key{
    return [[NSUserDefaults standardUserDefaults] valueForKey:key];
}
+(NSInteger)integerValueForKey:(NSString*)key{
    return [[[NSUserDefaults standardUserDefaults] valueForKey:key] integerValue];
}
+(CGFloat)floatValueForKey:(NSString*)key{
    return [[[NSUserDefaults standardUserDefaults] valueForKey:key] floatValue];
}
+(BOOL)boolValueForKey:(NSString*)key{
    return [[[NSUserDefaults standardUserDefaults] valueForKey:key] boolValue];
}
@end
